#ifndef MOCKMEDIAPLUGIN_H
#define MOCKMEDIAPLUGIN_H

#include "IF_MediaEngineInterface.h"

/**
 * @brief The MockMediaPlugin class is to be used as a sink
 * for simulating all operations that could address a media
 * player library, without actually activating any device.
 */

class MockMediaPlugin : public IF_MediaEngineInterface
{
   Q_OBJECT
public:
   explicit MockMediaPlugin(QObject *parent = 0);

   // IF_MediaEngineInterface interface
public slots:
   virtual void setCurrentSource(const AbstractMediaSource *source);
   virtual void play();
   virtual void pause();
   virtual void stop();
   virtual void rewind();
   virtual void setVolume(int vol);
   virtual int volume();
   virtual void setTickInterval(qint32 tickMs);
   virtual AudioObject::State state();
   virtual void onUserPositionRequested(qint64 positionMs);
   virtual void setMuted(bool muted);
   virtual void togglePlayPause();

   // mock functions
   const AbstractMediaSource * spyLastSource() {
      return m_lastSource;
   }

private:
   const AbstractMediaSource * m_lastSource;
   AudioObject::State m_audioState;
   int m_volume;
};

#endif // MOCKMEDIAPLUGIN_H
